//
//  ViewController.m
//  lenss 1
//
//  Created by M on 16/9/13.
//  Copyright © 2016年 lms. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btn;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *am;
@property (weak, nonatomic) IBOutlet UISlider *slier;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)anniu:(id)sender forEvent:(UIEvent *)event {
    self.btn.backgroundColor = [UIColor redColor];
    if (_am.isAnimating) {
        [_am stopAnimating];
    }else{
        [_am startAnimating];
    }
    //按钮控制activity
}
- (IBAction)onSwitch:(UISwitch *)sender {
    if (sender.isOn){
        [_am startAnimating];
    }else{
        [_am stopAnimating];
    }
    //switch 控制activity
}
- (IBAction)slier2:(UISlider *)sender {
    _slier.value = 1 - sender.value;//移动方向相反
    //_slier.value =  sender.value;移动反向同步
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
